package com.rockcent.helper;

import com.rockcent.mall.lib.domain.MallFund;
import com.rockcent.mall.lib.domain.MallFundFlow;
import com.rockcent.mall.lib.domain.enumclass.FundTransactionFlow;
import com.rockcent.mall.lib.domain.enumclass.MallFundFlowTransactionType;

import java.math.BigDecimal;

/**
 * Created by oyhk on 2016/11/25.
 * 平台资金流程帮助类
 */
public enum MallFundHelper {
    SINGLEONE;

    public void calculationMallFundAmount(MallFund mallFund, BigDecimal frozen, BigDecimal availableAmount) {
        mallFund.setFrozen(frozen);
        mallFund.setAvailableAmount(availableAmount);
        mallFund.setTotalAmount(frozen.add(availableAmount));// 总金额 = 可用金额 + 冻结金额
    }
}
